<?php

/*
 * 商家备案搜索
 */

namespace Association\Controller;

use Think\Controller;

class SearchController extends Controller {

    public function __construct() {
        parent::__construct();
        $this->service = D('Service','Logic');
    }
    
    public function index(){
        $this->display('index');
    }
    
    public function search(){
        $register_no = strtoupper(trim($_POST['register_no']));
        if(strlen($register_no)<1){
            $this->display('index');
            exit;
        }
        $shop_info = $this->service->search($register_no);
        $this->assign('shop_info',$shop_info);
        $this->display('index');
    }
    
}